package com.chapter12.homework_.homework01;/** * @author 宋鑫宇 * @version 1.0 */public class HomeWork01 {    public static void main(String[] args) {        double n1 = 0;        double n2 = 0;        try {            n1 = Double.parseDouble(args[0]);            n2 = Double.parseDouble(args[1]);        } catch (NumberFormatException e) {            System.out.println("数据格式异常"+e.getMessage());        }catch (ArrayIndexOutOfBoundsException e){            System.out.println("数组下标越界异常"+e.getMessage());        }        new HomeWork01().cal(n1,n2);    }    public void cal(double n1,double n2) {        try {            System.out.println("结果是" + n1 / n2);        }catch (ArithmeticException e) {            System.out.println("算数异常" + e.getMessage());        } catch (Exception e) {            System.out.println("其他异常" + e.getMessage());        }    }}